<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>智能订餐</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/base/Inforschool/css/style.css">
</head>
<body>
<div class="wraper">
    <div class="min-height">
        <div class="header font-white">
            <a href="javascript:history.go(-1)" class="iconfont icon-left font-white back"></a>
            <div class="font-16 text-center">订单详细信息</div>
        </div>
        <div>
            <div class="padding-8-12">
                <span class="iconfont icon-dingdan font-gray1"></span>
                <span class="margin-l10">订单信息</span>
            </div>
            <volist name="orderdata" id="v">
                <div class="detail bg_white">
                    <div class="flex_between money font-gray1 font-12 relative title border_dashed">
                        <div>
                            订餐人：{BEESCRM:$v['dname']}
                        </div>
                        <div>
                            下单时间：{BEESCRM:$v['time']}
                        </div>
                        <div class="circle circle_1"></div>
                        <div class="circle circle_2"></div>
                    </div>
                    <volist name="v.child" id="val">
                        <div class="boxs padding-6  font-gray1 border border_dashed">
                            <div class="number_of_people border-left border-left2">
                                {BEESCRM:$val['time']}
                            </div>
                            <div class="font-color">中餐</div>
                            <div class="flex_between">
                                <div>{BEESCRM:$val['mfoodname']}<if condition="!empty($val['mfoodid'])">:</if></div>
                                <div>{BEESCRM:$val['count(mfoodid)']}<if condition="!empty($val['mfoodid'])">份</if></div>
                            </div>
                            <div class="font-color">晚餐</div>
                            <div class="flex_between">
                                <div>{BEESCRM:$val['nfoodname']}<if condition="!empty($val['nfoodid'])">：</if></div>
                                <div>{BEESCRM:$val['count(nfoodid)']}<if condition="!empty($val['nfoodid'])">份</if></div>
                            </div>
                        </div>
                    </volist>
                </div>
                <div class="padding-8-12">
                    <span class="iconfont icon-peisong font-gray1"></span>
                    <span class="margin-l10">订单信息</span>
                </div>
                <div class="detail bg_white">
                    <div class="boxs padding-6  font-gray1 border">
                        <div class="flex ">
                            <div class="width-22">
                                用餐人数
                            </div>
                            <div>
                                {BEESCRM:$v['peoplenum']}
                            </div>
                        </div>
                        <div class="flex">
                            <div class="width-22">用餐时间</div>
                            <div>{BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}</div>
                        </div>
                        <div class="flex">
                            <div class="width-22">联系人</div>
                            <div>{BEESCRM:$v['consignor']}</div>
                        </div>
                        <div class="flex">
                            <div class="width-22">联系电话</div>
                            <div><span class="number">{BEESCRM:$v['mobile']}</span><a href="#"
                                                                                      class="iconfont icon-dianhua font-green margin-l10"></a>
                            </div>
                        </div>
                        <div class="flex">
                            <div class="width-22">用餐地点</div>
                            <div>{BEESCRM:$v['area']}</div>
                        </div>
                    </div>
                </div>
        </div>
        <input type="hidden" class="idx" value="{BEESCRM:$v['pass']}">
        <a href="#" class="btn btn2 font-16 text-center" data-or_sn="{BEESCRM:$v['or_sn']}">点击完成</a>
        </volist>
        <div class="pop-box height text-center hide">
            <div class="pop-hint font-gray1">
                <div class="top_green"></div>
                <div>
                    <p class="pop_title ">提示</p>
                    <p class="pop_txt">确定已制作完成？</p>
                </div>
                <input type="hidden" id="or_sn">
                <div class="flex_between pop_bottom">
                    <a href="#" class="pop_btn width-50">取消</a>
                    <a href="#" class="pop_btn width-50 active" id="check">确定</a>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/assets/base/Inforschool/js/jquery-2.1.0.min.js"></script>
<script>
    $('.icon-dianhua').click(function () {
        var number = $(this).siblings('.number').text();
        $(this).attr("href", 'tel:' + number);
    })
    var height = $(window).height();
    $('.wraper').css('minHeight', height);
    var btn_height = $('.btn').innerHeight();
    $('.min-height').css('height', height - btn_height - 12);

    $('.btn').click(function () {
        var or_sn = $(this).data('or_sn');
        $("#or_sn").val(or_sn);
        $('.pop-box').removeClass('hide');
    });
    $('.pop-box').on('click', '.pop_btn', function () {
        $('.pop-box').addClass('hide');
    });

    // $('.btn_complete ').click(function () {

    //     $('.pop-box').removeClass('hide');
    // });
    $(document).on('click', '#check', function () {
        var data = {};
        var json = {};
        var or_sn = $("#or_sn").val().trim();
        data.or_sn = or_sn;
        $.ajax({
            url: 'orderPass2',
            type: 'post',
            data: data,
            dataType: 'json',
            success: function (result) {
                if (result.status == 'S') {
                    $('#pass').addClass('hide');
                    $('.btn').addClass('hide');
                    /*  reload1();*/
                } else if (result.status == 'F') {
                    reload1();
                }
            }
        })

    })
    function reload1() {
        setTimeout('location.reload()', 3000);
    }

    $(function () {
        var idx = $('.idx').val();
        if (idx == 4) {
            $('.btn').remove();
        }

    })



</script>
</html>